/*
 *  Arrow
 *
 *  Created by David Giovannini on 1/5/07.
 *  Copyright 2007 Software by Jove. All rights reserved.
 *
 */
 
#ifndef SBJ_Arrow_RouterMsg_h
#define SBJ_Arrow_RouterMsg_h

#include "SBJ/Arrow/Message.h"
#include "SBJ/Arrow/IRouter.h"

#include <string>

namespace SBJ
{

namespace Arrow
{

class RouterMsg : public Message
{
public:
	typedef IRouter Subscriber;

	/// Parameterized constructor, requires a topic
	RouterMsg( const Topic& topic, Priority priority = highest_priority )
	: Message( topic, priority )
	{
	}

	/// Copy Constructor
	RouterMsg( RouterMsg& rhs )
	: Message( rhs )
	{
	}

	/// Destructor
	virtual ~RouterMsg( void )
	{
	}

	inline void invoke( Subscriber* router )
	{
		router->onMessage( *this );
	}
};

}

}

#endif